package com.bnz.order.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bnz.order.entity.TbAddress;
import com.bnz.order.mapper.TbAddressMapper;
import com.bnz.order.service.AddressService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl extends ServiceImpl<TbAddressMapper, TbAddress> implements AddressService {
    @Override
    //1. 根据登录名得到收件人地址列表
    public List<TbAddress> getAddressByName(String name) {
        List<TbAddress> userAddr = this.list(new QueryWrapper<TbAddress>().eq("user_id", name));
        return userAddr;
    }



}
